@namespace SwashbucklerDiary.Rcl.Components
@inherits DialogComponentBase

<CustomMDialog MyValue="Visible"
                  MyValueChanged="InternalVisibleChanged"
                  ContentClass="rounded-lg"
                  Eager="false"
                  MaxWidth="420">
    <MCard>
        <MCardTitle Class="font-weight-bold">
            @(I18n.T("About.Check for updates.Name"))
            <MSpacer></MSpacer>
            <MButton Icon="true"
                     OnClick="HandleOnCancel">
                <MIcon>mdi-close</MIcon>
            </MButton>
        </MCardTitle>
        <MCardText Class="pb-0">
            <div class="text-subtitle-1">@(I18n.T("VersionUpdate.Need updates"))</div>
            <MCheckbox @bind-Value="notPrompt"
                       TValue="bool"
                       Dense="true"
                       HideDetails="@("auto")"
                       OnChange="ChangeUpdateNotPrompt">
                <LabelContent>
                    <div class="text-subtitle-2">
                        @(I18n.T("VersionUpdate.Not prompting"))
                    </div>
                </LabelContent>
            </MCheckbox>
        </MCardText>
        <MCardActions>
            <MSpacer></MSpacer>
            <MButton Text="true"
                     OnClick="HandleOnCancel">
                @(I18n.T("Share.Cancel"))
            </MButton>
            <MButton Text="true"
                     Color="primary"
                     OnClick="ToUpdate">
                @(I18n.T("Share.OK"))
            </MButton>
        </MCardActions>
    </MCard>
</CustomMDialog>